#ifndef CILANTRO_CREDITCARD_H
#define CILANTRO_CREDITCARD_H
#include "cilantro.h"

typedef struct cilantro_cc_t {
	char track_one_data[1024];
	char track_two_data[1024];

	struct cilantro_cc_track_one_t * t1;
	struct cilantro_cc_track_two_t * t2;

} cilantro_cc;

typedef struct cilantro_cc_track_one_t {
	char start_sentinel;
	char format_code;
	char primary_account[19];
	char field_seperator;
	char country_code[3];
	char card_holder[32];
	char additional_data[256];
	char end_sentinel[2];
	char lrc[16];

} cilantro_cc_track_one;

typedef struct cilantro_cc_track_two_t {
	char start_sentinel[2];
    char primary_account[32];
    char field_seperator[2];
    char additional_data[256];
    char end_sentinel[2];
    char lrc[16];
} cilantro_cc_track_two;

int cilantro_cc_init( struct cilantro_config_t ** p );
int cilantro_cc_read( struct cilantro_config_t ** p );
int cilantro_cc_write( struct cilantro_config_t ** p );
int cilantro_cc_destroy ( struct cilantro_config_t **p);
#endif
